deploy: Ensure that we can deploy using only /usr/lib/ostree-boot
authorColin Walters <walters@verbum.org>
Mon, 1 Dec 2014 03:50:02 +0000 (22:50 -0500)
committerColin Walters <walters@verbum.org>
Mon, 1 Dec 2014 04:14:05 +0000 (23:14 -0500)
rpm-ostree at least has the option to generate a tree with just that
instead of /boot, but while we were enumerating the latter, we'd still
return paths from /boot.

https://bugzilla.gnome.org/show_bug.cgi?id=740947

src/libostree/ostree-sysroot-deploy.c

index 5cf4b2bcc116a80f16525cdf74abb64eaf8ce4fd..40dd7b54cea24427b64a61c5ed9aea39759db65d 100644 (file)
@@ -1050,7 +1050,7 @@ get_kernel_from_tree (GFile         *deployroot,
           if (ostree_validate_structureof_checksum_string (dash + 1, NULL))
             {
               kernel_checksum = g_strdup (dash + 1);
-              ret_kernel = g_file_get_child (bootdir, name);
+              ret_kernel = g_file_enumerator_get_child (dir_enum, file_info);
             }
         }
       else if (ret_initramfs == NULL && g_str_has_prefix (name, "initramfs-"))
@@ -1060,7 +1060,7 @@ get_kernel_from_tree (GFile         *deployroot,
           if (ostree_validate_structureof_checksum_string (dash + 1, NULL))
             {
               initramfs_checksum = g_strdup (dash + 1);
-              ret_initramfs = g_file_get_child (bootdir, name);
+              ret_initramfs = g_file_enumerator_get_child (dir_enum, file_info);
             }
         }